import { CreateDate, Date, ArrayColumn, DateTime, Desc, Digdit, Entity, GymTeacherId, PrimaryUuid, Title, UpdateDate, Uuid } from "@sker/core";

@Entity({ name: 'gym_activity' })
export class GymActivity {
    @PrimaryUuid()
    id: string;

    @GymTeacherId()
    teacher_id: string;

    @Title({ comment: '活动名' })
    title: string;

    @Desc({ comment: '详情' })
    desc: string;

    @Digdit({ comment: '期号' })
    index: number;

    @Digdit({ comment: '评星' })
    star: number;

    @Digdit({ comment: '最大报名人数' })
    max: number;

    @Digdit({ comment: '已报名人数' })
    count: number;

    @ArrayColumn({ comment: '报名时间', nullable: true })
    _join_date: [Date, Date]

    @Date({ comment: '报名开始时间' })
    join_start: Date;

    @Date({ comment: '报名截止时间' })
    join_end: Date;

    @ArrayColumn({ comment: '开课时间', nullable: true })
    _begin_date: [Date, Date]

    @Date({ comment: '开课时间' })
    start_date: Date;

    @Date({ comment: '结课时间' })
    end_date: Date;

    @Uuid({ comment: '地址' })
    place_id: string;

    @DateTime({ comment: '下期报名开始' })
    next_time: Date;

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;
}
